<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('外包入库片数统计列表')" />
    <style type="text/css">
        .bootstrap-table .fixed-table-container .fixed-table-body .table tbody tr td {
            /*padding: .75rem;*/
            padding: 0rem;
            vertical-align: middle;
            text-align: center;
            overflow: auto;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .bootstrap-table .fixed-table-container .fixed-table-body .table tbody tr {
            padding: 0rem;
        }
        /*#bootstrap-table {*/
        /*    !* 添加横向滚动条 *!*/
        /*    overflow-x: auto;*/
        /*    white-space: nowrap;*/
        /*    table-layout: fixed;*/
        /*    word-break: break-all;*/
        /*    word-wrap: break-word;*/
        /*}*/
        /*#bootstrap-table td, #bootstrap-table th {*/
        /*    white-space: normal;*/
        /*}*/
    </style>
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>日期：</label>
                                <input type="text" class="time-input" placeholder="请选择日期" name="timeFlag"/>
                            </li>
                            <li>
                                统计片数类别：
                                <select name="qtyType" th:with="type=${@dict.getType('qty_type')}">
                                <option value="">请选择</option>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="report:oshiplotqtysta:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-bordered">
                <table id="bootstrap-table" data-resizable="true"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('report:oshiplotqtysta:edit')}]];
        var removeFlag = [[${@permission.hasPermi('report:oshiplotqtysta:remove')}]];
        var qty_type = [[${@dict.getType('qty_type')}]];
        var prefix = ctx + "report/oshiplotqtysta";
        var columns = [
            [
                {
                    title : '',
                    align : 'center',
                    colspan : 2
                },
                {
                    title : '',
                    align : 'center',
                    colspan : 1
                },
                {
                    title : '当日 8点WIP',
                    align : 'center',
                    colspan : 4
                },
                {
                    title : '',
                    align : 'center',
                    colspan : 1
                },
                {
                    title : '',
                    align : 'center',
                    colspan : 1
                },
                {
                    title : '日期后一天 8点WIP',
                    align : 'center',
                    colspan : 4
                },
                {
                    title : '',
                    align : 'center',
                    colspan : 1
                }
            ],
            [
                {
                    field: 'id',
                    title: '',
                    visible: false,
                    align : 'center',
                },
                {
                    field: 'timeFlag',
                    title: '日期',
                    align : 'center',
                    sortable: true
                },
                {
                    field: 'qtyType',
                    title: '统计片数类别',
                    align : 'center',
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(qty_type, value);
                    }
                },
                {
                    field: 'todayWipWaitQty',
                    align : 'center',
                    title: 'WAIT'
                },
                {
                    field: 'todayWipHoldQty',
                    align : 'center',
                    title: 'HOLD'
                },
                {
                    field: 'todayWipRunQty',
                    align : 'center',
                    title: 'RUN'
                },
                {
                    field: 'todayWipTotalQty',
                    align : 'center',
                    title: '①总计'
                },
                {
                    field: 'fabToOqcQty',
                    align : 'center',
                    title: '②FAB TO OQC'
                },
                {
                    field: 'actualDonedQty',
                    align : 'center',
                    title: '③实做'
                },
                {
                    field: 'tomWipWaitQty',
                    align : 'center',
                    title: 'WAIT'
                },
                {
                    field: 'tomWipHoldQty',
                    align : 'center',
                    title: 'HOLD'
                },
                {
                    field: 'tomWipRunQty',
                    align : 'center',
                    title: 'RUN'
                },
                {
                    field: 'tomWipTotalQty',
                    align : 'center',
                    title: '④总计'
                },
                {
                    field: 'actDonedQtyStaTime',
                    align : 'center',
                    title: '实做片数统计时间'
                }
            ]
        ];
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "外包入库片数统计",
            pagination: false,
            sidePagination: "client",
            height: 440, // 设置表格高度，固定表头
            striped: true,
            columns: columns
        };

        $(function() {
            $.table.init(options);
        });
    </script>
</body>
</html>